<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/1/29
 * Time: 14:55
 */

namespace app\models;

use yii;
use yii\db\Query;

/**
 *账号余额表
 *
 */
class AccountMoney extends BaseModel
{
    public function __construct()
    {
        $this->table = yii::$app->db->tablePrefix . 'account_money';
    }

    public function all($where = [], $offset = false, $limit = false, $order = false)
    {
        $db = new Query();
        $list = $db->select('*')->from($this->table)->all();
        $returnArr = [];
        foreach ($list as $v) {
            $returnArr[$v['id']] = $v;
        }
        return $returnArr;
    }

    public function one($where = [])
    {

    }
}